module Types where

import Data.Word
import Network

data Bot = Bot {
            sock         :: Socket,
            status       :: Status,
            nick         :: String,
            log          :: Bool,
            connecting   :: [Filter],
            system       :: [Filter],
            patterns     :: [Filter],
            uptime       :: Int,
            disconnected :: [(String,Int)],
            buffer       :: [Word8],
            items        :: [Item],
            mobs         :: [Mob]
           }
           
data Status = Connecting | Ready | Locked

data Filter = All SubStr SubStr | User [String] SubStr SubStr
 deriving Show
data SubStr = S String SubStr | W Word8 SubStr | F String SubStr | End
 deriving Show
 
data Item = Item {
             iID :: String,
             iAegis :: String,
             iName :: String,
             iType :: String,
             iBuy :: String,
             iSell :: String,
             iWeight :: String,
             iATK :: String,
             iDef :: String,
             iRange :: String,
             iSlots :: String,
             iJob :: String,
             iUpper :: String,
             iGender :: String,
             iLoc :: String,
             iWLV :: String,
             iELV :: String,
             iRefineable :: String,
             iView :: String,
             iScript :: String,
             iOnEquip :: String,
             iOnUnEquip :: String
            }
            
data Mob = Mob {
            mID :: String,
            mName :: String,
            mAegis :: String,
            mLV :: String,
            mHP :: String,
            mEXP :: String,
            mJEXP :: String,
            mDrops :: [(String,String)],
            mCard :: (String,String)
           }
 